import axios from 'axios';

export function datasourceList() {
  return axios.get('/upms/ds/list');
}

export function addDs(data: any) {
  return axios.post('/upms/ds', data);
}

export function updateDs(data: any) {
  return axios.put('/upms/ds', data);
}

export function deleteDs(id: string) {
  return axios.delete(`/upms/ds/${id}`);
}

export function tableList(params: any) {
  return axios.get('/upms/gen/list', { params });
}

export function genView(data: any) {
  return axios.post('/upms/gen/view', data);
}
